package com.zzzyh.forumsystemclient.services.impl;

import com.zzzyh.forumsystemclient.common.AppResult;
import com.zzzyh.forumsystemclient.dao.ArticleReplyMapper;
import com.zzzyh.forumsystemclient.model.ArticleReply;
import com.zzzyh.forumsystemclient.services.IArticleReplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 郑雨杭
 * @create 2025/6/5 - 16:06
 */
@Service
public class ArticleReplyServiceImpl implements IArticleReplyService {
    @Autowired
    private ArticleReplyMapper  articleReplyMapper;
    @Override
    public void addArticleReply(ArticleReply articleReply) {
        articleReplyMapper.insertSelective(articleReply);

    }

    @Override
    public List<ArticleReply> getCommentsByArticleId(Long articleId) {
        List<ArticleReply> articleReplies = articleReplyMapper.selectByArticleId(articleId);
        return articleReplies;
    }
}
